
import { checkCreatSiteForm } from "./formRuler";
import rules from "../../../../utils/rules"
// isBoolean:true, // 是否为Boolean类型, 参数是否必须为boolen类型，不是根据options个数判断，是根据后台字段类型要求判断
const logStrategy = [
  {
    value: '',
    type: 'title',
    id:'contentSetup',
    children:[
      { 
        value: '',
        param: 'tableSize',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '请输入预警阀值',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "当前日志使用情况：",
        type:'label-value',

      },
      {
        value: '',
        param: 'warnThreshold',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '请输入预警阀值',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "预警阀值：",
        
        beforeText: '',
        afterText: 'MB',
        extra:'数据库日志数据表超出该阀值后，系统将每日9点发送一次通知',
        min:0,
        precision:2,
        type: 'numberInput',
      },
      
      {
        value: '',
        param: 'dangerThreshold',
        rule: {
          required: true,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '请输入告警阀值',
          msg2: '',
          api: "",
          key: '',
          params: {}, //校验传参
        },
        label: "告警阀值：",
        beforeText: '',
        afterText: 'MB',
        extra:'数据库日志数据表超出该阀值后，系统将每小时发送一次通知，其值必须大于预警阀值',
        min:0,
        precision:2,
        type: 'numberInput',
      },
      {
        value: '',
        param: 'noticeEmailList',
        placeholder:'请输入通知邮箱',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: '',
          params: {}, //校验传参
        },
        label: "通知邮箱：",
        beforeText: '',
        afterText: '',
        extra:'当日志数据表达到预警或告警阀值后，系统会自动通知上述设置邮箱，多个使用 ；分割，系统必须开通邮箱服务器才能正常发送，最多上限100个',
        type: 'textArea',
      },
      {
        value: '',
        param: 'noticeSmsList',
        placeholder:'请输入预警/告警手机号',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: '',
          params: {}, //校验传参
        },
        label: "预警/告警手机号：",
        beforeText: '',
        afterText: '',
        extra:'当日志数据表达到预警或告警阀值后，系统会自动发短信通知上述手机号，多个使用 ；分割，系统必须开通短信服务器才能正常发送，最多上限100个',
        type: 'textArea',
      },
      {
        value: '',
        param: 'dangerSmsTmpId',
        placeholder:'请输入短信平台中的模板ID',
        rule: {
          required: false,
          validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: '',
          params: {}, //校验传参
        },
        label: "短信通知模板ID：",
        beforeText: '',
        afterText: '',
        extra:'',
        type: 'textInput',
      },
      
    ]
  },
]
export {logStrategy}